package com.shuwen.gcdj.bean.basicsEquitment.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import java.time.LocalDate;


@Data
@ApiModel
public class EquipmentReq{

    @ApiModelProperty(value = "设备名称",required = true)
    @NotBlank(message = "设备名称不能为空")
    private String name;

    @ApiModelProperty(value = "编号",required = true)
    @NotBlank(message = "设备编号不能为空")
    @Range(max=10)
    private String code;

    @ApiModelProperty(value = "类型",required = true)
    @NotBlank(message = "设备类型不能为空")
    private Integer type;

    @ApiModelProperty(value = "区域位置",required = true)
    @NotBlank(message = "区域位置不能为空")
    private Integer areaLocation;

    @ApiModelProperty(value = "安装位置",required = true)
    @NotBlank(message = "安装位置不能为空")
    private Integer installLocation;

    @ApiModelProperty(value = "管理员",required = true)
    @NotBlank(message = "管理员不能为空")
    private String manager;

    @ApiModelProperty("设计资料")
    private String resourceId;

    @ApiModelProperty(value = "投产日期",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate commissioningDate;

}
